home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Image & Music Effects / random-banner.izs < prev    next >
Text File  |  2005-07-30  |  2KB  |  136 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Random Banner script
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>A script that will load a random banner with the corresponding link and text link (out of three possible banners in this example).
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>img and music effects<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13. <SCRIPT>
  14.  
  15. <!-- written by The Omega
  16.  
  17. //   http://members.xoom.com/the_omega/
  18.  
  19. //   the_omega@geocities.com
  20.  
  21. // You must leave these comments in to use the script
  22.  
  23. //  (hey, I wrote it. Let me have a little credit!)
  24.  
  25.  
  26.  
  27. // put info for randomly selected banners here, as in the examples
  28.  
  29. gfx0="banner1.gif";
  30.  
  31. lnk0="page1.html";
  32.  
  33. alt0="Alt code 1";
  34.  
  35. txt0="Tagline 1";
  36.  
  37. gfx1="banner2.gif";
  38.  
  39. lnk1="page2.html";
  40.  
  41. alt1="Alt code 2";
  42.  
  43. txt1="Tagline 2";
  44.  
  45. gfx2="banner3.gif";
  46.  
  47. lnk2="page3.html";
  48.  
  49. alt2="Alt code 3";
  50.  
  51. txt2="Tagline 3";
  52.  
  53. len=3;  // change to equal number of banners
  54.  
  55.  
  56.  
  57. today=new Date();
  58.  
  59. today=today.getTime()/10;
  60.  
  61. rnd=today%len;
  62.  
  63. document.writeln('<A HREF="'+eval("lnk"+rnd)+'"><IMG SRC="'+eval("gfx"+rnd)+'" ALT="'+eval("alt"+rnd)+'"><BR>'+eval("txt"+rnd)+'</A>');
  64.  
  65. //-->
  66.  
  67. </SCRIPT>
  68.  
  69.  
  70. <!-- END OF SCRIPT -->
  71. <!/SCRIPT>
  72.  
  73. <!PREVIEW>
  74. <!-- START OF SCRIPT -->
  75.  
  76. <SCRIPT>
  77.  
  78. <!-- written by The Omega
  79.  
  80. //   http://members.xoom.com/the_omega/
  81.  
  82. //   the_omega@geocities.com
  83.  
  84. // You must leave these comments in to use the script
  85.  
  86. //  (hey, I wrote it. Let me have a little credit!)
  87.  
  88.  
  89.  
  90. // put info for randomly selected banners here, as in the examples
  91.  
  92. gfx0="banner1.gif";
  93.  
  94. lnk0="page1.html";
  95.  
  96. alt0="Alt code 1";
  97.  
  98. txt0="Tagline 1";
  99.  
  100. gfx1="banner2.gif";
  101.  
  102. lnk1="page2.html";
  103.  
  104. alt1="Alt code 2";
  105.  
  106. txt1="Tagline 2";
  107.  
  108. gfx2="banner3.gif";
  109.  
  110. lnk2="page3.html";
  111.  
  112. alt2="Alt code 3";
  113.  
  114. txt2="Tagline 3";
  115.  
  116. len=3;  // change to equal number of banners
  117.  
  118.  
  119.  
  120. today=new Date();
  121.  
  122. today=today.getTime()/10;
  123.  
  124. rnd=today%len;
  125.  
  126. document.writeln('<A HREF="'+eval("lnk"+rnd)+'"><IMG SRC="'+eval("gfx"+rnd)+'" ALT="'+eval("alt"+rnd)+'"><BR>'+eval("txt"+rnd)+'</A>');
  127.  
  128. //-->
  129.  
  130. </SCRIPT>
  131.  
  132.  
  133. <!-- END OF SCRIPT -->
  134. <!/PREVIEW>
  135.  
  136. <!RELATED>NONE<!/RELATED>